package com.ruoyi.buss.customer.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.buss.customer.mapper.DataWgJtcyMapper;
import com.ruoyi.buss.customer.domain.DataWgJtcy;
import com.ruoyi.buss.customer.service.IDataWgJtcyService;

/**
 * 网格家庭成员Service业务层处理
 * 
 * @author sxy
 * @date 2021-07-16
 */
@Service
public class DataWgJtcyServiceImpl implements IDataWgJtcyService 
{
    @Autowired
    private DataWgJtcyMapper dataWgJtcyMapper;

    /**
     * 查询网格家庭成员
     * 
     * @param id 网格家庭成员ID
     * @return 网格家庭成员
     */
    @Override
    public DataWgJtcy selectDataWgJtcyById(String id)
    {
        return dataWgJtcyMapper.selectDataWgJtcyById(id);
    }

    /**
     * 查询网格家庭成员列表
     * 
     * @param dataWgJtcy 网格家庭成员
     * @return 网格家庭成员
     */
    @Override
    public List<DataWgJtcy> selectDataWgJtcyList(DataWgJtcy dataWgJtcy)
    {
        return dataWgJtcyMapper.selectDataWgJtcyList(dataWgJtcy);
    }

    /**
     * 新增网格家庭成员
     * 
     * @param dataWgJtcy 网格家庭成员
     * @return 结果
     */
    @Override
    public int insertDataWgJtcy(DataWgJtcy dataWgJtcy)
    {
        dataWgJtcy.setCreateTime(DateUtils.getNowDate());
        return dataWgJtcyMapper.insertDataWgJtcy(dataWgJtcy);
    }

    /**
     * 修改网格家庭成员
     * 
     * @param dataWgJtcy 网格家庭成员
     * @return 结果
     */
    @Override
    public int updateDataWgJtcy(DataWgJtcy dataWgJtcy)
    {
        dataWgJtcy.setUpdateTime(DateUtils.getNowDate());
        return dataWgJtcyMapper.updateDataWgJtcy(dataWgJtcy);
    }

    /**
     * 批量删除网格家庭成员
     * 
     * @param ids 需要删除的网格家庭成员ID
     * @return 结果
     */
    @Override
    public int deleteDataWgJtcyByIds(String[] ids)
    {
        return dataWgJtcyMapper.deleteDataWgJtcyByIds(ids);
    }

    /**
     * 删除网格家庭成员信息
     * 
     * @param id 网格家庭成员ID
     * @return 结果
     */
    @Override
    public int deleteDataWgJtcyById(String id)
    {
        return dataWgJtcyMapper.deleteDataWgJtcyById(id);
    }
}
